///<reference path='SPRESTList.ts'/>
///<reference path='SPRESTContext.ts'/>
///<reference path='SPRESTWeb.ts'/>

// Module
module SPREST {
    // Class
    export class ContentType {
        public urlFieldLinks: string = null;
        public urlFields: string = null;
        public urlParent: string = null;
        public urlWorkflowAssociations: string = null;
        public description:string = null;
        public displayFormTemplateName:string = null;
        public displayFormUrl:string = null;
        public documentTemplate: string = null;
        public documentTemplateUrl: string = null;
        public editFormTemplateName: string = null;
        public editFormUrl: string = null;
        public group: string = null;
        public hidden: bool = null;
        public id: string = null;
        public jSLink: string = null;
        public name: string = null;
        public newFormTemplate: string = null;
        public newFormUrl: string = null;
        public readOnly: bool = null;
        public schemaXml: string = null;
        public scope: string = null;
        public sealed: bool = null;

        constructor (public Context: SPREST.Context, public Web: SPREST.Web, resultData: any) { 
            this.urlFieldLinks = resultData.FieldLinks.__deferred.uri;
            this.urlFields = resultData.Fields.__deferred.uri;
            this.urlParent = resultData.Parent.__deferred.uri;
            this.urlWorkflowAssociations = resultData.WorkflowAssociations.__deferred.uri;
            this.description = resultData.Description;
            this.displayFormTemplateName = resultData.DisplayFormTemplateName;
            this.displayFormUrl = resultData.DisplayFormUrl;
            this.documentTemplate = resultData.DocumentTemplate;
            this.documentTemplateUrl = resultData.DocumentTemplateUrl;
            this.editFormTemplateName = resultData.EditFormTemplateName;
            this.editFormUrl = resultData.EditFormUrl;
            this.group = resultData.Group;
            this.hidden = resultData.Hidden;
            this.id = resultData.StringId;
            this.jSLink = resultData.JSLink;
            this.name = resultData.Name;
            this.newFormTemplate = resultData.NewFormTemplate;
            this.newFormUrl = resultData.NewFormUrl;
            this.readOnly = resultData.ReadOnly;
            this.schemaXml = resultData.SchemaXml;
            this.scope = resultData.Scope;
            this.sealed = resultData.Sealed;
        }

    }

}
